package com.ddx.common.enums;

public enum UserStatus {
	
	NORMAL(0, "正常"),
    FROZEN(1,"冻结"),
	DELETE(2, "销户");

    private int value;
    private String desc;

    UserStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static UserStatus getUserStatus(int value) {
        UserStatus[] userStatus = UserStatus.values();
        for (UserStatus userStatu : userStatus) {
            if (userStatu.getValue() == value) {
                return userStatu;
            }
        }
        return null;
    }

}
